package com.cactus.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cactus.entity.UserAdd;
import com.cactus.mapper.UserAddMapper;
import com.cactus.service.UserAddServer;
import org.springframework.stereotype.Service;


@Service
public class UserAddServerImpl
        extends ServiceImpl<UserAddMapper, UserAdd> implements UserAddServer {


    @Override
    public UserAdd getAddIdByUser(String userId) {
        return getOne(new LambdaQueryWrapper<UserAdd>()
                .eq(UserAdd::getUserId, userId).last("LIMIT 1"));
    }
}
